﻿@using Website.CRUDServices
@using Location = Website.Models.Domain.Location
@{
    this.ViewBag.Title = "Søgning - Netværk";
    this.Layout = "~/Views/_Shared/_Layout.cshtml";
    List<Project> projects = this.ViewData["Projects"] as List<Project> ?? new List<Project>();
    List<Location> locations = this.ViewData["Locations"] as List<Location> ?? new List<Location>();
    List<Profile> profiles = this.ViewData["Profiles"] as List<Profile> ?? new List<Profile>();
    List<Presentation> presentations = this.ViewData["Presentations"] as List<Presentation> ?? new List<Presentation>();
}

<h2>@ViewBag.Title</h2>

<script>
    $(function() {
        $('#Profiles').multiSelect();
        $('#Presentations').multiSelect();
        $('#SupportForBusinessAttendance').multiSelect();
    });
</script>

@using (this.Html.BeginForm("NetworkingSearchResult", "Reports"))
{
    @* Tilføjer søge-partial *@
    @Html.Partial("~/Views/Reports/_SearchDefaultFields.cshtml", projects)

    <div class="formBullet">Profiler som skal indgå:</div>
    <div class="formEntry">
        <select name="Profiles" id="Profiles" multiple="multiple">
            @foreach (Profile prof in profiles)
            {
                <option value="@prof.ID">@prof.Name</option>
            }
        </select>
    </div>

    <div class="formBullet">Lokation:</div>
    <div class="formEntry">
        <select name="Location" id="Location">
            <option value="@Guid.Empty.ToString()" selected="selected"></option>
            @foreach (Location loc in locations)
            {
                <option value="@loc.ID">@loc.Name</option>
            }
        </select>
    </div>

    <div class="formBullet">Præsentationer:</div>
    <div class="formEntry">
        <select multiple="multiple" name="Presentations" id="Presentations">
            @foreach (Presentation pres in presentations)
            {
                <option value="@pres.ID">@pres.Name</option>
            }
        </select>
    </div>
    
    <div class="formBullet">Hvilket type netværk er der tale om?</div>
    <div class="formEntry">
        <input type="radio" name="NetworkType" value="All" checked>Alle<br />
        <input type="radio" name="NetworkType" value="IsNetworkingEvent">Netværksmøde<br />
        <input type="radio" name="NetworkType" value="IsConferenceEvent">Konference<br />
        <input type="radio" name="NetworkType" value="IsDelegationTravel">Delegationsrejse<br />
        <input type="radio" name="NetworkType" value="IsProductLaunch">Produkt lancering<br />
    </div>
    
            // Organizer chooser
    <div class="formBullet">Arrangør</div>
    <div class="formEntry">
        <select name="Organizer" id="Organizer">
                <option value="" selected="selected"></option>
            @foreach (Profile prof in profiles)
            {
                <option value="@prof.ID">@prof.Name</option>
            }
        </select>
    </div>

            // Profiles chooser
    <div class="formBullet">Understøttelse af virksomhedsdeltagelse</div>
    <div class="formEntry">
        <select multiple="multiple" name="SupportForBusinessAttendance" id="SupportForBusinessAttendance">
            @foreach (Profile prof in profiles)
            {
                <option value="@prof.ID">@prof.Name</option>
            }
        </select>
    </div>
    
    <div class="buttonHolder">
        <input type="submit" value="Søg" /></div>
}